home *** CD-ROM | disk | FTP | other *** search
/ SciTech / Scitech_FTP.zip / Scitech / SciTech MGL 4.05 / projects.txt < prev    next >
Text File  |  2018-01-25  |  20KB  |  410 lines

  1.  
  2.                      SciTech MGL Graphics Library
  3.                             Version 4.05
  4.  
  5.                  Cool Projects and Things To Be Added
  6.                              May 12 1998
  7.  
  8.  
  9. What is this document for?
  10. --------------------------
  11.  
  12. This text document is intended to provide an overview of some of the
  13. neat projects that could be worked on within the SciTech MGL to make
  14. it a better product. If you are interested in working on any of these
  15. projects, log onto news.scitechsoft.com and check out the
  16. scitech.mgl.developer newsgroup. There may be other people working on
  17. in the same area and you could contribute to this work.
  18.  
  19. If you have any other ideas for cool projects for the SciTech MGL, let
  20. us know and we can add them to this list.
  21.  
  22. Blitting Functions
  23. ------------------
  24.  
  25.  . Add support for stretching in ModeX modes, using a simple stretch to
  26.    a temporary buffer and then blit to the screen using the ModeX
  27.    putScanLine functions.
  28.  
  29.  . Add support for MGL_flipBlit and MGL_mirrorBlit functions that will
  30.    do a blit of a bitmap with a flip in the vertical direction or a mirror
  31.    in the horizontal direction. Most useful for sprite based games. We
  32.    would also need to implement transparent versions of these functions.
  33.  
  34.  . Add support for stretching with transparency. Currently the MGL will
  35.    only support stretching without transparency and vice versa.
  36.  
  37.  . Add support for transparent blitting between device contexts of
  38.    different pixel depths and pixel formats (ie: a translated, transparent
  39.    blit). Currently the MGL requires that the pixel formats and color depth
  40.    be the same for transparent blits.
  41.  
  42.  . Add faster, optimised C code for implementing special case translated
  43.    blits. The most obvious candidate would be to implement fast 8-bit to
  44.    15/16/24/32 blitting functions optimised for each case, since this
  45.    is a good color depth for sprites. Currently the code to handle 8-bit
  46.    to higher color depth translates goes through a single generic module
  47.    in EMULATE\EM_TRANI.C
  48.  
  49.  . Add support for stretch blitting from 4 bit DC's to 15/16 bit DC's.
  50.    Currently the MGL only handles stretching from 8 to higher color depths,
  51.    but not 4 bit.
  52.  
  53.  . In order to provide better support for downloading of sprite data to
  54.    hardware we could provide new functions to create special bitmaps
  55.    allocated in offscreen memory on the graphics card. The offscreen memory
  56.    manager from the Game Framework Sprite Library could then be merged
  57.    into the main MGL libraries, and use either that or DirectDraw to manage
  58.    the surfaces when we create them.
  59.  
  60.    Currently the SciTech MGL can only allocate a single, rectangular
  61.    offscreen bitmap when running under DirectDraw, and on newer cards we
  62.    could use DirectDraw to allocate smaller offsceen bitmaps for us more
  63.    efficiently (ie: similar to the linear offscreen device contexts in the
  64.    MGL).
  65.  
  66.  . Add a new MGL_bitBltRegion() function that would perform a normal BitBlt,
  67.    but the blt will be clipped to the passed in region to the source
  68.    device context. This can then be used for doing very fast blts of
  69.    arbitrary areas for overlays etc. It could also be done in hardware
  70.    using the blitter to move each scanline, which would work well for
  71.    non-transparent blitter hardware.
  72.  
  73.    If we added a new MGL_bitBltBatch() function to allow blitting of a
  74.    batch of rectangles, then we could layer the above function directly
  75.    on top of that (for hardware accelerators). Then we could add a new
  76.    bltBatch function to the VBE/AF device drivers to full handle multiple
  77.    small blts very quickly (might make it very fast for transparent cockpit
  78.    overlays etc).
  79.  
  80. Internal Rendering Functions
  81. ----------------------------
  82.  
  83.  . New integer ellipse algorithm to replace the current floating point
  84.    routine that is a place holder. The old integer ellipse algorithm
  85.    suffered from overflow in the decision variables (4*A^3 is a large
  86.    number when A gets about about 800; A is the diameter of the ellipse),
  87.    so the decision variables are now floating point. I am sure a better
  88.    algorithm could be implemented that would solve this problem.
  89.  
  90.  . Add support for portait display capabilties so that the coordinate
  91.    system for the MGL could be turned on end (either left or right) for
  92.    a tall skinny display. For most of the rendering functions this would
  93.    be easy, since all you need to do is swap the coordinates. The MGL
  94.    text functions already support drawing in any 90 degree angle so that
  95.    is easy. The biggest change would be new bitmap blitting functions that
  96.    will do on the fly conversions between horizontal and vertical scanlines
  97.    when blitting the bitmaps to the screen.
  98.  
  99.  . Add support for color mouse cursors. Currently the MGL only supports
  100.    single color mouse cursors, and color mouse cursors would allow you to
  101.    do cool things like have animated cursors playing while loading data
  102.    from CD-ROM or whatever.
  103.  
  104.  . Change the mouse cursor rendering, to copy from the screen to a small
  105.    scratch buffer, render the mouse cursor image to this system buffer and
  106.    then blit the result to the screen. This will result is perfectly smooth
  107.    mouse cursor motion that will totally eliminate any flicker.
  108.  
  109.  . Add support for 32x32 or larger patterns rather than the default 8x8
  110.    bitmap pattern support.
  111.  
  112.  . Add support for fat elliptical arc rendering. We can do this quickly by
  113.    computing an elliptical region and chopping out the wedge, although
  114.    using regions may be a little slow.
  115.  
  116.  . Add support for round cornered rectangles.
  117.  
  118.  . Add support for scaling monochrome bitmaps to any size during rendering.
  119.    Perhaps what we really need to do is add support for a mono stretchBlt
  120.    routine that will actually stretch a mono bitmap to the display. Hence
  121.    the bitmap will not need to be changed, just the code that does the
  122.    blt operation.
  123.  
  124.  . Add code to align the bitmap pattern origin to a new location so
  125.    that pattern fills can be done properly allowing the pattern to be
  126.    aligned to any starting pixel coordinate. Currently the pattern is
  127.    always locked to the global screen coordinates.
  128.  
  129.  . Add support for high speed pixmap rendering code. Basic pixmap (ie:
  130.    color pattern fills) has been implemented in C for the library code,
  131.    but none of it has been optimized yet).
  132.  
  133. Device Driver Functions
  134. -----------------------
  135.  
  136.  . Add support for rendering directly to the surface of a window using
  137.    either DCI (for Windows 3.1, Windows 95 and Windows NT) or DirectDraw
  138.    (Windows 95 and Windows NT). Once this is implemented, it will be possible
  139.    to use the MGL rendering functions to draw directly into a window for
  140.    transparent bitmap rendering as well as implement front buffer rendering
  141.    for OpenGL.
  142.  
  143.    The only complication with this is that rendering to the window can be
  144.    complicated if the window is obscured by other windows, since we then
  145.    need to handle the clip regions properly. In order to get around this
  146.    problem, we can probably have an MGL function that will allow the app
  147.    programmer to determine if the window is obscured, and if so do all
  148.    rendering to a system memory back buffer and blit that to the screen
  149.    (the blit will of course be correctly clipped).
  150.  
  151. Stereo LC Shutter Glasses Support
  152. ---------------------------------
  153.  
  154.  . Add Stereo support into the Game Framework. The MGL API itself is
  155.    currently Stereo Enabled, but the Game Framework has yet to have
  156.    stereo support added.
  157.  
  158.  . Update the MGL OpenGL bindings to properly support stereo. Most of
  159.    the work for this has already been done, but stereo has not yet been
  160.    tested when using the OpenGL libraries (only the regular MGL code).
  161.  
  162.  . Add Stereo support to the SGI SkyFly OpenGL sample program, as well
  163.    as some of the other OpenGL samples. The best way to do this would
  164.    be to include a -stereo command line switch to enable stereo in the
  165.    standard sample program.
  166.  
  167.  . Add support for software stereo for systems that dont have hardware
  168.    stereo page flipping or hardware stereo syncing. This needs to be
  169.    done using a timer driven interrupt (using the real time clock I
  170.    believe) for the DOS environment, and a VxD in Windows 95 based on
  171.    the same principle.
  172.  
  173.    Perhaps some of the Stereo LC shutter glasses manufacturers would like
  174.    to step up to the plate and take a look at adding software stereo
  175.    support to the MGL?
  176.  
  177. Region Algebra Functions
  178. ------------------------
  179.  
  180.  . Add support for the missing polygon region functions, elliptical arc
  181.    region functions and other region generation primitives.
  182.  
  183.  . Modify the segment definition to include both X1 and X2 coordinates in
  184.    the same segment and re-write the underlying algebra routines. This
  185.    will make the memory requirements significantly smaller for complex
  186.    regions and will make it faster (but the algebra routines will
  187.    be more complicated).
  188.  
  189.  . Add support for clipping all output to a selected clip region. This
  190.    could probably be implemented by using a small driver routine that
  191.    would hook between the API call and the device driver call when a
  192.    complex clip region is selected, that would select each rectangle
  193.    in the clip region as the current driver clip rectangle and then
  194.    re-issue the driver rendering command over and over until the region
  195.    has been traveresed.
  196.  
  197. Bitmap Loading/Saving support
  198. -----------------------------
  199.  
  200.  . Add support for 1/4/24 bpp bit PCX files. Currently the MGL will
  201.    only read PCX files that are 8-bpp.
  202.  
  203.  . Add support for PNG bitmap reading, based on the freely available
  204.    LIBPNG library. This would be very similar to the new JPEG functions
  205.    based on the IJG JPEG library.
  206.  
  207.  . Add support for TIFF bitmap reading, based on the freely available
  208.    LIBTIFF library. This would be very similar to the new JPEG functions
  209.    based on the IJG JPEG library.
  210.  
  211. Font Functions
  212. --------------
  213.  
  214.  . The MGL currently does not have support for scaling bitmap fonts from
  215.    one size to another, so you can only use the size specified in the
  216.    font files on disk. It might be interesting to add a font scale
  217.    function that would scale the monochrome glyphs in the font file
  218.    when it is loaded from disk.
  219.  
  220.  . The MGL currently includes a bunch of font files that are in the MGL
  221.    1.x font file format, but it can also load fonts in the Windows 2.x
  222.    style font format (standard format used by Windows 3.x, Windows 95
  223.    and Windows NT). A useful project would be to write a font converter
  224.    from the MGL headers and source that would convert the MGL 1.x style
  225.    fonts to Windows 2.x style fonts. With this completed it would then
  226.    be possible to edit any of the MGL fonts with a Windows font editor.
  227.  
  228.  . The MGL currently only support loading of Windows 2.x fonts in the
  229.    .FNT format which is a single font per file. Normally Windows bitmap
  230.    fonts are distributed in .FON Font Library format with all the sizes
  231.    for that font included in a single file. An interesting project would
  232.    be to add support for Font Libraries to the MGL so that a single font
  233.    of a specified size could be loaded from a specified font library
  234.    file on disk. Of course to make this really useful, the MGL 1.x fonts
  235.    would need to be converted to Windows 2.x format so that the font
  236.    collection can be all converted to font libraries.
  237.  
  238.  . The MGL currently supports only bitmap and stroke font files, and does
  239.    not support True Type fonts. An interesting project would be to write
  240.    some code that loads and renders a True Type font for the MGL internally,
  241.    so that font can be used as a bitmap font of a specified size.
  242.  
  243.    This project has actually neen started by an MGL developer, using the
  244.    FreeType library for doing the TrueType font conversions. At this
  245.    stage the code is not integrated into the MGL library proper, so this
  246.    project should be relatively simple to complete.
  247.  
  248.  . The MGL currently does not support caching of font data in offscreen
  249.    memory when using a VBE/AF hardware accelerated mode. Although the
  250.    MGL_putMonoImage function is fully accelerated by VBE/AF, storing the
  251.    font data in offscreen video memory will provide a big increase in font
  252.    rendering performance on VBE/AF 2.0 drivers that support the new
  253.    PutMonoImageLin functions (and in fact some hardware devices can only
  254.    support this format). Hence an interesting project would be to add
  255.    support for caching the font data in offscreen video memory for ultra
  256.    fast font drawing (if the font is rotated, the cache font would have to
  257.    be rotated also, but the MGL already does this internally).
  258.  
  259. MegaVision C++ GUI Framework
  260. ----------------------------
  261.  
  262.  . The MegaVision currently has a few minor bugs in the screen update code,
  263.    so an useful project would be to take a look at fixing some of these
  264.    bugs.
  265.  
  266.  . The MegaVision library currently has classes for Radio Buttons and
  267.    Check Boxes, but those classes have not been completed (no support for
  268.    drawing the text labels for the buttons!). An interesting project would
  269.    be to flesh out the button controls for the MegaVision including these
  270.    and adding support for bitmapped buttons to the library.
  271.  
  272.  . The MegaVision library currently requires that all user interface
  273.    components be created in code, and does not have a disk based resource
  274.    file format. A useful project would be to create a resource editor
  275.    for MegaVision and a set of routines to load the definitions of the
  276.    resources from disk, allowing user interfaces to be constructed in a
  277.    visual manner.
  278.  
  279.  . One thing that would make the MegaVision a very powerful GUI library
  280.    is to add support for changing the 'Style' or Look and Feel of the
  281.    GUI library, such as how the windows look, how the buttons look etc.
  282.    It might be possible to change a lot of the UI drawing code to be
  283.    bitmap based so that a different set of bitmaps could be used to
  284.    completely customise the look and feel of the GUI library (great for
  285.    game devlopers who want a GUI that fits in with the theme of the game!).
  286.  
  287. Game Framework
  288. --------------
  289.  
  290.  . Add code to the Sprite Manager to allow it to not own the source
  291.    bitmaps so they wont be deleted when it is destructed.
  292.  
  293.  . Add support for assembler run length encoding routines. We can change
  294.    the code not support any clipping, and to maintain the original bitmap
  295.    as well as the RLE bitmap and draw the original bitmap when clipping
  296.    is on (may be faster). Although clipping may be just as easy.
  297.  
  298.  . Add code to the Sprite Manager so that we can change the active device
  299.    context and it will automatically figure out how to reload the bitmaps
  300.    into the new device contexts.
  301.  
  302. Mesa OpenGL Support
  303. -------------------
  304.  
  305.  . Layer the Mesa rendering functions on top of the MGL 3D rendering
  306.    functions for primitives that are supported. These functions are
  307.    written in assemble and are relatively fast, and would make rendering
  308.    in Mesa quite a bit faster when using the MGL.
  309.  
  310.  . Get the 3Dfx and S3 Virge accelerated version of Mesa compiled and
  311.    working with the SciTech MGL. It should be possible to implement the
  312.    new DGL OpenGL/DirectDraw bindings interface in these drivers for fully
  313.    integrated fullscreen OpenGL support.
  314.  
  315. Hardware OpenGL Support
  316. -----------------------
  317.  
  318.  . Flesh out the support for the MGL 2D rendering and bitmap functions
  319.    using the OpenGL drawing functions. This will then allow the MGL to run
  320.    with hardware acceleration on hardware accelerated OpenGL drivers for
  321.    the 2D MGL functions (like MGL_bitBlt, MGL_drawRect etc).
  322.  
  323. Enhanced DOS Extender Support
  324. -----------------------------
  325.  
  326.  . Update the support for the Phar Lap TNT DOS Extender, which can be used
  327.    with the Borland, Microsoft, Symantec and Watcom C++ 32-bit DOS
  328.    compilers. The basic TNT support functions are already implemented in
  329.    the PM/Pro library (full interrupt handling, mouse handling etc). The
  330.    only missing function is PM_mapPhysicalAddr() which maps a physical
  331.    memory address to a linear address. In the early MGL 2.0 beta libraries
  332.    this was done by creating a selector and using that selector in all
  333.    the drawing code, however now the code is purely 32-bit flat linear
  334.    addressing so this function needs to be implement.
  335.  
  336.    When running under a real DPMI DOS extender the Phar Lap DPMI 1.0
  337.    functions wont work, but you can probably write some code to detect this
  338.    and use the direct DPMI calls that we use for the Watcom C++, Borland C++
  339.    and DJGPP versions of this function (see the GENERIC_DPMI32 section
  340.    of the PMLITE.C module.
  341.  
  342. Ports to other Operating Systems
  343. --------------------------------
  344.  
  345. The MGL internally is developed using a combination of C and assembler,
  346. however the MGL can be compiled using a #define NO_ASSEMBLER macro, which
  347. effectively disable all the runtime assembler functions and compiles in
  348. optimized C code equivalents to these functions. For ports to other OS'es
  349. running on the Intel platform, getting the assembler code to compile and
  350. link for that OS would be benefical, but for non Intel CPU's you can simply
  351. use the C only code.
  352.  
  353. 1. Complete the port to the DEC Alpha running Windows NT. The MGL libraries
  354.    have already been ported to the DEC Alpha, however some of the code
  355.    in the MGL (specifically the fixed point math functions) could benefit
  356.    from being re-written to use the DEC Alpha 64-bit multiples in C for
  357.    very efficient fixed point routines. Some of the low level rendering
  358.    functions like blitting might also benefit from a sprinkling of
  359.    Alpha assembler code.
  360.  
  361. 2. Port to the Linux OS. The MGL compiles and links fine with GCC under
  362.    DOS (DJGPP), so it should compile and link just fine with GCC under
  363.    Linux. We also have the OBJ2BFD utility that converts the TASM'ed
  364.    assembler code to COFF, ELF or other formats so that it should be
  365.    possible to compile and link the real assembler code with a Linux port.
  366.  
  367.    The most complicated part of doing a port to Linux is adding the MGL
  368.    binding functions that usually live in the MGLWIN\MGLWIN.C module (the
  369.    Windows version). These bindings would need to be developed to allow
  370.    for rendering in a window using a X shared memory buffer, as well as
  371.    rendering to a fullscreen display using whatever fullscreen technology
  372.    is available.
  373.  
  374.    An even better project would be to get support for VBE/AF working under
  375.    the Linux OS, and then you could do fullscreen exclusive modes similar
  376.    to DirectDraw or WinDirect under the Windows environments. VBE/AF would
  377.    take care of all the details of controlling the graphics card, and would
  378.    include full support for 2D acceleration functions.
  379.  
  380.    A Linux port could also form the foundation of a port to any other
  381.    OS (Intel or Non-Intel) based on the Unix environment.
  382.  
  383. 3. Port to OS/2 Warp. This would be an interesting port, assuming that
  384.    people are still interested in developing for OS/2. I dont know if
  385.    many game developers would care about this, but perhaps IBM could step
  386.    in and do this ;-)
  387.  
  388. 4. Port to the Apple Macintosh OS. This would also be an interesting port.
  389.    The Macintosh is a gamer developers paradise waiting to happen, since
  390.    there are lots and lots of Macs hanging out in peoples homes. Being
  391.    able to cross compile a game for the Mac without any major headaches
  392.    would be a real plus.
  393.  
  394. 5. Port to the Apple Rhapsody OS. This is going to be an interesting OS,
  395.    so it would be interesting to see a port to this, especially the Intel
  396.    version of Rhapsody. Perhaps Apple would be interested in doing this ;-)
  397.  
  398. 6. Port to the BeOS. I dont know much about this OS, but it sounds neat.
  399.    Perhaps a port to the BeOS would be cool, especially since the appear
  400.    to be very focused on OpenGL so it might be a cool game developer
  401.    platform.
  402.  
  403. 7. Port to Silicon Graphics Workstations. Now this would be a killer port,
  404.    especially if there was full OpenGL support in the libraries. With a
  405.    port to SGI boxes, you could do testing and development on SGI boxes
  406.    and then re-compile the code for testing on real PC before deployment.
  407.    Maybe Silicon Graphics would be interested in doing this ;-)
  408.  
  409. ---- END OF PROJECTS.TXT ----
  410.